import 'package:json_annotation/json_annotation.dart';

part 'radioModel.g.dart';


@JsonSerializable()
class RadioModel extends Object{

  @JsonKey(name: 'code')
  int code;

  @JsonKey(name: 'message')
  String message;

  @JsonKey(name: 'result')
  List<RadioResult> result;

  RadioModel(this.code,this.message,this.result,);

  factory RadioModel.fromJson(Map<String, dynamic> srcJson) => _$RadioModelFromJson(srcJson);

}


@JsonSerializable()
class RadioResult extends Object{

  @JsonKey(name: 'channellist')
  List<Channellist> channellist;

  @JsonKey(name: 'cid')
  int cid;

  @JsonKey(name: 'title')
  String title;

  RadioResult(this.channellist,this.cid,this.title,);

  factory RadioResult.fromJson(Map<String, dynamic> srcJson) => _$RadioResultFromJson(srcJson);

}


@JsonSerializable()
class Channellist extends Object{

  @JsonKey(name: 'cate_name')
  String cateName;

  @JsonKey(name: 'cate_sname')
  String cateSname;

  @JsonKey(name: 'ch_name')
  String chName;

  @JsonKey(name: 'channelid')
  String channelid;

  @JsonKey(name: 'name')
  String name;

  @JsonKey(name: 'thumb')
  String thumb;

  @JsonKey(name: 'value')
  int value;

  Channellist(this.cateName,this.cateSname,this.chName,this.channelid,this.name,this.thumb,this.value,);

  factory Channellist.fromJson(Map<String, dynamic> srcJson) => _$ChannellistFromJson(srcJson);

}


